package com.cw1.design1Single;

/**
 * @Author qiuMi
 * @description 单例模式 - JDK源码
 * @Date 2022-09-27 22:24
 **/
public class SingleTestByJdk {
    public static void main(String[] args) {
        /**
         * java.lang.Runtime就是经典的 - 饿汉式 - 静态常量
         */
        Runtime runtime1 = Runtime.getRuntime();
        Runtime runtime2 = Runtime.getRuntime();
        System.out.println(runtime1 == runtime2);
    }
}


